package com.example.gzysmartcity.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.gzysmartcity.R;
import com.example.gzysmartcity.repository.model.Personnel;

import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class PersonnelRvAdapter extends BaseQuickAdapter<Personnel.DataBean, BaseViewHolder> {
    List<String> typeName=new ArrayList<>(Arrays.asList("汽车工程师","汽车工人","技术人员","质检人员"));
    public PersonnelRvAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, Personnel.DataBean dataBean) {
        baseViewHolder.setText(R.id.rv_personnel_name,dataBean.getPersonName());
        baseViewHolder.setText(R.id.rv_personnel_yxiang,"应聘意向："+typeName.get(dataBean.getType()));
        baseViewHolder.setText(R.id.rv_personnel_text,"资历："+dataBean.getContent()+"   体力："+dataBean.getPower());
        baseViewHolder.setText(R.id.rv_personnel_pirce,"期望薪资："+dataBean.getPrice());
    }
}
